home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / info / texinfo.info-8.z / texinfo.info-8
Encoding:
GNU Info File  |  1998-05-21  |  47.6 KB  |  1,216 lines

  1. This is Info file ../info/texinfo.info, produced by Makeinfo version
  2. 1.68 from the input file texinfo.texi.
  3.  
  4. INFO-DIR-SECTION Texinfo documentation system
  5. START-INFO-DIR-ENTRY
  6. * Texinfo: (texinfo).           The GNU documentation format.
  7. * install-info: (texinfo)Invoking install-info. Updating info/dir entries.
  8. * texi2dvi: (texinfo)Format with texi2dvi.      Printing Texinfo documentation.
  9. * texindex: (texinfo)Format with tex/texindex.  Sorting Texinfo index files.
  10. * makeinfo: (texinfo)makeinfo Preferred.        Translate Texinfo source.
  11. END-INFO-DIR-ENTRY
  12.  
  13.   This file documents Texinfo, a documentation system that can produce
  14. both on-line information and a printed manual from a single source file.
  15.  
  16.   Copyright (C) 1988, 90, 91, 92, 93, 95, 96, 97 Free Software
  17. Foundation, Inc.
  18.  
  19.   This is the second edition of the Texinfo documentation,
  20. and is consistent with version 2 of `texinfo.tex'.
  21.  
  22.   Permission is granted to make and distribute verbatim copies of this
  23. manual provided the copyright notice and this permission notice are
  24. preserved on all copies.
  25.  
  26.   Permission is granted to copy and distribute modified versions of this
  27. manual under the conditions for verbatim copying, provided that the
  28. entire resulting derived work is distributed under the terms of a
  29. permission notice identical to this one.
  30.  
  31.   Permission is granted to copy and distribute translations of this
  32. manual into another language, under the above conditions for modified
  33. versions, except that this permission notice may be stated in a
  34. translation approved by the Free Software Foundation.
  35.  
  36. 
  37. File: texinfo.info,  Node: Defining Macros,  Next: Invoking Macros,  Prev: Macros,  Up: Macros
  38.  
  39. Defining Macros
  40. ===============
  41.  
  42.   You use the Texinfo `@macro' command to define a macro.  For example:
  43.  
  44.      @macro MACRO-NAME{PARAM1, PARAM2, ...}
  45.      TEXT ... \PARAM1\ ...
  46.      @end macro
  47.  
  48.   The "parameters" PARAM1, PARAM2, ... correspond to arguments supplied
  49. when the macro is subsequently used in the document (see the next
  50. section).
  51.  
  52.   If a macro needs no parameters, you can define it either with an empty
  53. list (`@macro foo {}') or with no braces at all (`@macro foo').
  54.  
  55.   The definition or "body" of the macro can contain any Texinfo
  56. commands, including previously-defined macros.  (It is not possible to
  57. have mutually recursive Texinfo macros.)  In the body, instances of a
  58. parameter name surrounded by backslashes, as in `\PARAM1\' in the
  59. example above, are replaced by the corresponding argument from the
  60. macro invocation.
  61.  
  62.   You can undefine a macro FOO with `@unmacro FOO'.  It is not an error
  63. to undefine a macro that is already undefined.  For example:
  64.  
  65.      @unmacro foo
  66.  
  67. 
  68. File: texinfo.info,  Node: Invoking Macros,  Prev: Defining Macros,  Up: Macros
  69.  
  70. Invoking Macros
  71. ===============
  72.  
  73.   After a macro is defined (see the previous section), you can use
  74. ("invoke") it in your document like this:
  75.  
  76.      @MACRO-NAME {ARG1, ARG2, ...}
  77.  
  78. and the result will be just as if you typed the body of MACRO-NAME at
  79. that spot.  For example:
  80.  
  81.      @macro foo {p, q}
  82.      Together: \p\ & \q\.
  83.      @end macro
  84.      @foo{a, b}
  85.  
  86. produces:
  87.  
  88.      Together: a & b.
  89.  
  90.   Thus, the arguments and parameters are separated by commas and
  91. delimited by braces; any whitespace after (but not before) a comma is
  92. ignored.  To insert a comma, brace, or backslash in an argument,
  93. prepend a backslash, as in
  94.  
  95.      @MACRO-NAME {\\\{\}\,}
  96.  
  97. which will pass the (almost certainly error-producing) argument `\{},'
  98. to MACRO-NAME.
  99.  
  100.   If the macro is defined to take a single argument, and is invoked
  101. without any braces, the entire rest of the line after the macro name is
  102. supplied as the argument.  For example:
  103.  
  104.      @macro bar {p}
  105.      Twice: \p\, \p\.
  106.      @end macro
  107.      @bar aah
  108.  
  109. produces:
  110.  
  111.      Twice: aah, aah.
  112.  
  113. 
  114. File: texinfo.info,  Node: Format/Print Hardcopy,  Next: Create an Info File,  Prev: Macros,  Up: Top
  115.  
  116. Format and Print Hardcopy
  117. *************************
  118.  
  119.   There are three major shell commands for making a printed manual from
  120. a Texinfo file: one for converting the Texinfo file into a file that
  121. will be printed, a second for sorting indices, and a third for printing
  122. the formatted document.  When you use the shell commands, you can either
  123. work directly in the operating system shell or work within a shell
  124. inside GNU Emacs.
  125.  
  126.   If you are using GNU Emacs, you can use commands provided by Texinfo
  127. mode instead of shell commands.  In addition to the three commands to
  128. format a file, sort the indices, and print the result, Texinfo mode
  129. offers key bindings for commands to recenter the output buffer, show the
  130. print queue, and delete a job from the print queue.
  131.  
  132. * Menu:
  133.  
  134. * Use TeX::                     Use TeX to format for hardcopy.
  135. * Format with tex/texindex::    How to format in a shell.
  136. * Format with texi2dvi::        A simpler way to use the shell.
  137. * Print with lpr::              How to print.
  138. * Within Emacs::                How to format and print from an Emacs shell.
  139. * Texinfo Mode Printing::       How to format and print in Texinfo mode.
  140. * Compile-Command::             How to print using Emacs's compile command.
  141. * Requirements Summary::        TeX formatting requirements summary.
  142. * Preparing for TeX::           What you need to do to use TeX.
  143. * Overfull hboxes::             What are and what to do with overfull hboxes.
  144. * smallbook::                   How to print small format books and manuals.
  145. * A4 Paper::                    How to print on European A4 paper.
  146. * Cropmarks and Magnification::  How to print marks to indicate the size
  147.                                 of pages and how to print scaled up output.
  148.  
  149. 
  150. File: texinfo.info,  Node: Use TeX,  Next: Format with tex/texindex,  Prev: Format/Print Hardcopy,  Up: Format/Print Hardcopy
  151.  
  152. Use TeX
  153. =======
  154.  
  155.   The typesetting program called TeX is used for formatting a Texinfo
  156. file.  TeX is a very powerful typesetting program and, if used right,
  157. does an exceptionally good job.  (*Note How to Obtain TeX: Obtaining
  158. TeX, for information on how to obtain TeX.)
  159.  
  160.   The `makeinfo', `texinfo-format-region', and `texinfo-format-buffer'
  161. commands read the very same @-commands in the Texinfo file as does TeX,
  162. but process them differently to make an Info file; see *Note Create an
  163. Info File::.
  164.  
  165. 
  166. File: texinfo.info,  Node: Format with tex/texindex,  Next: Format with texi2dvi,  Prev: Use TeX,  Up: Format/Print Hardcopy
  167.  
  168. Format using `tex' and `texindex'
  169. =================================
  170.  
  171.   Format the Texinfo file with the shell command `tex' followed by the
  172. name of the Texinfo file.  For example:
  173.  
  174.      tex foo.texi
  175.  
  176. TeX will produce a "DVI file" as well as several auxiliary files
  177. containing information for indices, cross references, etc.  The DVI
  178. file (for "DeVice Independent" file) can be printed on virtually any
  179. printe (see the following sections).
  180.  
  181.   The `tex' formatting command itself does not sort the indices; it
  182. writes an output file of unsorted index data.  (The `texi2dvi' command
  183. automatically generates indices; see *Note Format using `texi2dvi':
  184. Format with texi2dvi.)  To generate a printed index after running the
  185. `tex' command, you first need a sorted index to work from.  The
  186. `texindex' command sorts indices.  (The source file `texindex.c' comes
  187. as part of the standard Texinfo distribution, among other places.)
  188.  
  189.   The `tex' formatting command outputs unsorted index files under names
  190. that obey a standard convention: the name of your main input file with
  191. any `.tex' (or similar, *note tex invocation: (web2c)tex invocation.)
  192. extension removed, followed by the two letter names of indices.  For
  193. example, the raw index output files for the input file `foo.texinfo'
  194. would be `foo.cp', `foo.vr', `foo.fn', `foo.tp', `foo.pg' and `foo.ky'.
  195. Those are exactly the arguments to give to `texindex'.
  196.  
  197.   Instead of specifying all the unsorted index file names explicitly,
  198. you can use `??' as shell wildcards and give the command in this form:
  199.  
  200.      texindex foo.??
  201.  
  202. This command will run `texindex' on all the unsorted index files,
  203. including any that you have defined yourself using `@defindex' or
  204. `@defcodeindex'.  (You may execute `texindex foo.??'  even if there are
  205. similarly named files with two letter extensions that are not index
  206. files, such as `foo.el'.  The `texindex' command reports but otherwise
  207. ignores such files.)
  208.  
  209.   For each file specified, `texindex' generates a sorted index file
  210. whose name is made by appending `s' to the input file name.  The
  211. `@printindex' command knows to look for a file of that name (*note
  212. Printing Indices & Menus::.).  `texindex' does not alter the raw index
  213. output file.
  214.  
  215.   After you have sorted the indices, you need to rerun the `tex'
  216. formatting command on the Texinfo file.  This regenerates the DVI file,
  217. this time with up-to-date index entries.
  218.  
  219.   Finally, you may need to run `tex' one more time, to get the page
  220. numbers in the cross-references correct.
  221.  
  222.   To summarize, this is a four step process:
  223.  
  224.   1. Run `tex' on your Texinfo file.  This generates a DVI file (with
  225.      undefined cross-references and no indices), and the raw index files
  226.      (with two letter extensions).
  227.  
  228.   2. Run `texindex' on the raw index files.  This creates the
  229.      corresponding sorted index files (with three letter extensions).
  230.  
  231.   3. Run `tex' again on your Texinfo file.  This regenerates the DVI
  232.      file, this time with indices and defined cross-references, but
  233.      with page numbers for the cross-references from last time,
  234.      generally incorrect.
  235.  
  236.   4. Run `tex' one last time.  This time the correct page numbers are
  237.      written for the cross-references.
  238.  
  239.   Alternatively, it's a one-step process: run `texi2dvi'.
  240.  
  241.   You need not run `texindex' each time after you run `tex'.  If you do
  242. not, on the next run, the `tex' formatting command will use whatever
  243. sorted index files happen to exist from the previous use of `texindex'.
  244. This is usually ok while you are debugging.
  245.  
  246. 
  247. File: texinfo.info,  Node: Format with texi2dvi,  Next: Print with lpr,  Prev: Format with tex/texindex,  Up: Format/Print Hardcopy
  248.  
  249. Format using `texi2dvi'
  250. =======================
  251.  
  252.   The `texi2dvi' command is a shell script that automatically runs both
  253. `tex' and `texindex' as many times as necessary to produce a DVI file
  254. with up-to-date, sorted indices.  It simplifies the
  255. `tex'--`texindex'--`tex' sequence described in the previous section.
  256.  
  257.   The syntax for `texi2dvi' is like this (where `prompt$' is the shell
  258. prompt):
  259.  
  260.      prompt$ texi2dvi FILENAME...
  261.  
  262. 
  263. File: texinfo.info,  Node: Print with lpr,  Next: Within Emacs,  Prev: Format with texi2dvi,  Up: Format/Print Hardcopy
  264.  
  265. Shell Print Using `lpr -d'
  266. ==========================
  267.  
  268.   The precise command to print a DVI file depends on your system
  269. installation, but `lpr -d' is common.  The command may require the DVI
  270. file name without any extension or with a `.dvi' extension.  (If it is
  271. `lpr', you must include the `.dvi'.)
  272.  
  273.   The following commands, for example, will (probably) suffice to sort
  274. the indices, format, and print the `Bison Manual':
  275.  
  276.      tex bison.texinfo
  277.      texindex bison.??
  278.      tex bison.texinfo
  279.      lpr -d bison.dvi
  280.  
  281. (Remember that the shell commands may be different at your site; but
  282. these are commonly used versions.)
  283.  
  284.   Using the `texi2dvi' shell script, you simply need type:
  285.  
  286.      texi2dvi bison.texinfo
  287.      lpr -d bison.dvi
  288.  
  289. 
  290. File: texinfo.info,  Node: Within Emacs,  Next: Texinfo Mode Printing,  Prev: Print with lpr,  Up: Format/Print Hardcopy
  291.  
  292. From an Emacs Shell
  293. ===================
  294.  
  295.   You can give formatting and printing commands from a shell within GNU
  296. Emacs.  To create a shell within Emacs, type `M-x shell'.  In this
  297. shell, you can format and print the document.  *Note Format and Print
  298. Hardcopy: Format/Print Hardcopy, for details.
  299.  
  300.   You can switch to and from the shell buffer while `tex' is running
  301. and do other editing.  If you are formatting a long document on a slow
  302. machine, this can be very convenient.
  303.  
  304.   You can also use `texi2dvi' from an Emacs shell.  For example, here
  305. is how to use `texi2dvi' to format and print `Using and Porting GNU CC'
  306. from a shell within Emacs:
  307.  
  308.      texi2dvi gcc.texinfo
  309.      lpr -d gcc.dvi
  310.  
  311.   *Note Texinfo Mode Printing::, for more information about formatting
  312. and printing in Texinfo mode.
  313.  
  314. 
  315. File: texinfo.info,  Node: Texinfo Mode Printing,  Next: Compile-Command,  Prev: Within Emacs,  Up: Format/Print Hardcopy
  316.  
  317. Formatting and Printing in Texinfo Mode
  318. =======================================
  319.  
  320.   Texinfo mode provides several predefined key commands for TeX
  321. formatting and printing.  These include commands for sorting indices,
  322. looking at the printer queue, killing the formatting job, and
  323. recentering the display of the buffer in which the operations occur.
  324.  
  325. `C-c C-t C-b'
  326. `M-x texinfo-tex-buffer'
  327.      Run `texi2dvi' on the current buffer.
  328.  
  329. `C-c C-t C-r'
  330. `M-x texinfo-tex-region'
  331.      Run TeX on the current region.
  332.  
  333. `C-c C-t C-i'
  334. `M-x texinfo-texindex'
  335.      Sort the indices of a Texinfo file formatted with
  336.      `texinfo-tex-region'.
  337.  
  338. `C-c C-t C-p'
  339. `M-x texinfo-tex-print'
  340.      Print a DVI file that was made with `texinfo-tex-region' or
  341.      `texinfo-tex-buffer'.
  342.  
  343. `C-c C-t C-q'
  344. `M-x tex-show-print-queue'
  345.      Show the print queue.
  346.  
  347. `C-c C-t C-d'
  348. `M-x texinfo-delete-from-print-queue'
  349.      Delete a job from the print queue; you will be prompted for the job
  350.      number shown by a preceding `C-c C-t C-q' command
  351.      (`texinfo-show-tex-print-queue').
  352.  
  353. `C-c C-t C-k'
  354. `M-x tex-kill-job'
  355.      Kill the currently running TeX job started by `texinfo-tex-region'
  356.      or `texinfo-tex-buffer', or any other process running in the
  357.      Texinfo shell buffer.
  358.  
  359. `C-c C-t C-x'
  360. `M-x texinfo-quit-job'
  361.      Quit a TeX formatting job that has stopped because of an error by
  362.      sending an <x> to it.  When you do this, TeX preserves a record of
  363.      what it did in a `.log' file.
  364.  
  365. `C-c C-t C-l'
  366. `M-x tex-recenter-output-buffer'
  367.      Redisplay the shell buffer in which the TeX printing and formatting
  368.      commands are run to show its most recent output.
  369.  
  370.   Thus, the usual sequence of commands for formatting a buffer is as
  371. follows (with comments to the right):
  372.  
  373.      C-c C-t C-b             Run `texi2dvi' on the buffer.
  374.      C-c C-t C-p             Print the DVI file.
  375.      C-c C-t C-q             Display the printer queue.
  376.  
  377.   The Texinfo mode TeX formatting commands start a subshell in Emacs
  378. called the `*tex-shell*'.  The `texinfo-tex-command',
  379. `texinfo-texindex-command', and `tex-dvi-print-command' commands are
  380. all run in this shell.
  381.  
  382.   You can watch the commands operate in the `*tex-shell*' buffer, and
  383. you can switch to and from and use the `*tex-shell*' buffer as you
  384. would any other shell buffer.
  385.  
  386.   The formatting and print commands depend on the values of several
  387. variables.  The default values are:
  388.  
  389.           Variable                              Default value
  390.      
  391.      texinfo-texi2dvi-command                  "texi2dvi"
  392.      texinfo-tex-command                       "tex"
  393.      texinfo-texindex-command                  "texindex"
  394.      texinfo-delete-from-print-queue-command   "lprm"
  395.      texinfo-tex-trailer                       "@bye"
  396.      tex-start-of-header                       "%**start"
  397.      tex-end-of-header                         "%**end"
  398.      tex-dvi-print-command                     "lpr -d"
  399.      tex-show-queue-command                    "lpq"
  400.  
  401.   You can change the values of these variables with the `M-x
  402. edit-options' command (*note Editing Variable Values: (emacs)Edit
  403. Options.), with the `M-x set-variable' command (*note Examining and
  404. Setting Variables: (emacs)Examining.), or with your `.emacs'
  405. initialization file (*note Init File: (emacs)Init File.).
  406.  
  407. 
  408. File: texinfo.info,  Node: Compile-Command,  Next: Requirements Summary,  Prev: Texinfo Mode Printing,  Up: Format/Print Hardcopy
  409.  
  410. Using the Local Variables List
  411. ==============================
  412.  
  413.   Yet another way to apply the TeX formatting command to a Texinfo file
  414. is to put that command in a "local variables list" at the end of the
  415. Texinfo file.  You can then specify the `tex' or `texi2dvi' commands as
  416. a `compile-command' and have Emacs run it by typing `M-x compile'.
  417. This creates a special shell called the `*compilation*' buffer in which
  418. Emacs runs the compile command.  For example, at the end of the
  419. `gdb.texinfo' file, after the `@bye', you could put the following:
  420.  
  421.      Local Variables:
  422.      compile-command: "texi2dvi gdb.texinfo"
  423.      End:
  424.  
  425. This technique is most often used by programmers who also compile
  426. programs this way; see *Note Compilation: (emacs)Compilation.
  427.  
  428. 
  429. File: texinfo.info,  Node: Requirements Summary,  Next: Preparing for TeX,  Prev: Compile-Command,  Up: Format/Print Hardcopy
  430.  
  431. TeX Formatting Requirements Summary
  432. ===================================
  433.  
  434.   Every Texinfo file that is to be input to TeX must begin with a
  435. `\input' command and must contain an `@setfilename' command:
  436.  
  437.      \input texinfo
  438.      @setfilename ARG-NOT-USED-BY-TEX
  439.  
  440. The first command instructs TeX to load the macros it needs to process
  441. a Texinfo file and the second command opens auxiliary files.
  442.  
  443.   Every Texinfo file must end with a line that terminates TeX's
  444. processing and forces out unfinished pages:
  445.  
  446.      @bye
  447.  
  448.   Strictly speaking, these lines are all a Texinfo file needs to be
  449. processed successfully by TeX.
  450.  
  451.   Usually, however, the beginning includes an `@settitle' command to
  452. define the title of the printed manual, an `@setchapternewpage'
  453. command, a title page, a copyright page, and permissions.  Besides an
  454. `@bye', the end of a file usually includes indices and a table of
  455. contents.  (And of course most manuals contain a body of text as well.)
  456.  
  457. For more information, see
  458. *Note `@settitle': settitle,
  459. *Note `@setchapternewpage': setchapternewpage,
  460. *Note Page Headings: Headings,
  461. *Note Titlepage & Copyright Page::,
  462. *Note Printing Indices & Menus::, and
  463. *Note Contents::.
  464.  
  465. 
  466. File: texinfo.info,  Node: Preparing for TeX,  Next: Overfull hboxes,  Prev: Requirements Summary,  Up: Format/Print Hardcopy
  467.  
  468. Preparing to Use TeX
  469. ====================
  470.  
  471. TeX needs to know where to find the `texinfo.tex' file that you have
  472. told it to input with the `\input texinfo' command at the beginning of
  473. the first line.  The `texinfo.tex' file tells TeX how to handle
  474. @-commands; it is included in all standard GNU distributions.
  475.  
  476.   Usually, the `texinfo.tex' file is put under the default directory
  477. that contains TeX macros
  478. (`/usr/local/share/texmf/tex/texinfo/texinfo.tex' by default) when GNU
  479. Emacs or other GNU software is installed.  In this case, TeX will find
  480. the file and you do not need to do anything special.  Alternatively,
  481. you can put `texinfo.tex' in the current directory when you run TeX,
  482. and TeX will find it there.
  483.  
  484.   Also, you should install `epsf.tex' in the same place as
  485. `texinfo.tex', if it is not already installed from another
  486. distribution.  This file is needed to support the `@image' command
  487. (*note Images::.).
  488.  
  489.   Optionally, you may create an additional `texinfo.cnf', and install
  490. it as well.  This file is read by TeX at the `@setfilename' command
  491. (*note `@setfilename': setfilename.).  You can put any commands you
  492. like there according to local site-wide conventions, and they will be
  493. read by TeX when processing any Texinfo document.  For example, if
  494. `texinfo.cnf' contains the a single line `@afourpaper' (*note A4
  495. Paper::.), then all Texinfo documents will be processed with that page
  496. size in effect.  If you have nothing to put in `texinfo.cnf', you do
  497. not need to create it.
  498.  
  499.   If neither of the above locations for these system files suffice for
  500. you, you can specify the directories explicitly.  For `texinfo.tex',
  501. you can do this by writing the complete path for the file after the
  502. `\input' command.  Another way, that works for both `texinfo.tex' and
  503. `texinfo.cnf' (and any other file TeX might read), is to set the
  504. `TEXINPUTS' environment variable in your `.cshrc' or `.profile' file.
  505.  
  506.   Which you use of `.cshrc' or `.profile' depends on whether you use a
  507. Bourne shell-compatible (`sh', `bash', `ksh', ...) or C
  508. shell-compatible (`csh', `tcsh') command interpreter.  The latter read
  509. the `.cshrc' file for initialization information, and the former read
  510. `.profile'.
  511.  
  512.   In a `.cshrc' file, you could use the following `csh' command
  513. sequence:
  514.  
  515.      setenv TEXINPUTS .:/home/me/mylib:/usr/lib/tex/macros
  516.  
  517.   In a `.profile' file, you could use the following `sh' command
  518. sequence:
  519.  
  520.      TEXINPUTS=.:/home/me/mylib:/usr/lib/tex/macros
  521.      export TEXINPUTS
  522.  
  523. This would cause TeX to look for `\input' file first in the current
  524. directory, indicated by the `.', then in a hypothetical user's
  525. `me/mylib' directory, and finally in a system directory.
  526.  
  527. 
  528. File: texinfo.info,  Node: Overfull hboxes,  Next: smallbook,  Prev: Preparing for TeX,  Up: Format/Print Hardcopy
  529.  
  530. Overfull "hboxes"
  531. =================
  532.  
  533.   TeX is sometimes unable to typeset a line without extending it into
  534. the right margin.  This can occur when TeX comes upon what it
  535. interprets as a long word that it cannot hyphenate, such as an
  536. electronic mail network address or a very long title.  When this
  537. happens, TeX prints an error message like this:
  538.  
  539.      Overfull \hbox (20.76302pt too wide)
  540.  
  541. (In TeX, lines are in "horizontal boxes", hence the term, "hbox".  The
  542. backslash, `\', is the TeX equivalent of `@'.)
  543.  
  544.   TeX also provides the line number in the Texinfo source file and the
  545. text of the offending line, which is marked at all the places that TeX
  546. knows how to hyphenate words.  *Note Catching Errors with TeX
  547. Formatting: Debugging with TeX, for more information about typesetting
  548. errors.
  549.  
  550.   If the Texinfo file has an overfull hbox, you can rewrite the sentence
  551. so the overfull hbox does not occur, or you can decide to leave it.  A
  552. small excursion into the right margin often does not matter and may not
  553. even be noticeable.
  554.  
  555.   However, unless told otherwise, TeX will print a large, ugly, black
  556. rectangle beside the line that contains the overfull hbox.  This is so
  557. you will notice the location of the problem if you are correcting a
  558. draft.
  559.  
  560.   To prevent such a monstrosity from marring your final printout, write
  561. the following in the beginning of the Texinfo file on a line of its own,
  562. before the `@titlepage' command:
  563.  
  564.      @finalout
  565.  
  566. 
  567. File: texinfo.info,  Node: smallbook,  Next: A4 Paper,  Prev: Overfull hboxes,  Up: Format/Print Hardcopy
  568.  
  569. Printing "Small" Books
  570. ======================
  571.  
  572.   By default, TeX typesets pages for printing in an 8.5 by 11 inch
  573. format.  However, you can direct TeX to typeset a document in a 7 by
  574. 9.25 inch format that is suitable for bound books by inserting the
  575. following command on a line by itself at the beginning of the Texinfo
  576. file, before the title page:
  577.  
  578.      @smallbook
  579.  
  580. (Since regular sized books are often about 7 by 9.25 inches, this
  581. command might better have been called the `@regularbooksize' command,
  582. but it came to be called the `@smallbook' command by comparison to the
  583. 8.5 by 11 inch format.)
  584.  
  585.   If you write the `@smallbook' command between the start-of-header and
  586. end-of-header lines, the Texinfo mode TeX region formatting command,
  587. `texinfo-tex-region', will format the region in "small" book size
  588. (*note Start of Header::.).
  589.  
  590.   The Free Software Foundation distributes printed copies of `The GNU
  591. Emacs Manual' and other manuals in the "small" book size.  *Note
  592. `@smallexample' and `@smalllisp': smallexample & smalllisp, for
  593. information about commands that make it easier to produce examples for
  594. a smaller manual.
  595.  
  596.   Alternatively, to avoid embedding this physical paper size in your
  597. document, use `texi2dvi' to format your document (*note Format with
  598. texi2dvi::.), and supply `-t @smallbook' as an argument.  Then other
  599. people do not have to change the document source file to format it
  600. differently.
  601.  
  602. 
  603. File: texinfo.info,  Node: A4 Paper,  Next: Cropmarks and Magnification,  Prev: smallbook,  Up: Format/Print Hardcopy
  604.  
  605. Printing on A4 Paper
  606. ====================
  607.  
  608.   You can tell TeX to typeset a document for printing on European size
  609. A4 paper with the `@afourpaper' command.  Write the command on a line
  610. by itself between `@iftex' and `@end iftex' lines near the beginning of
  611. the Texinfo file, before the title page:
  612.  
  613.   For example, this is how you would write the header for this manual:
  614.  
  615.      \input texinfo    @c -*-texinfo-*-
  616.      @c %**start of header
  617.      @setfilename texinfo
  618.      @settitle Texinfo
  619.      @syncodeindex vr fn
  620.      @iftex
  621.      @afourpaper
  622.      @end iftex
  623.      @c %**end of header
  624.  
  625.   Alternatively, to avoid embedding this physical paper size in your
  626. document, use `texi2dvi' to format your document (*note Format with
  627. texi2dvi::.), and supply `-t @afourpaper' as an argument.  Then other
  628. people do not have to change the document source file to format it
  629. differently.
  630.  
  631.   Another alternative: put the `@afourpaper' command in the file
  632. `texinfo.cnf' that TeX will read.  (No need for `@iftex' there.)  This
  633. will automatically typeset all the Texinfo documents at your site with
  634. that paper size in effect.
  635.  
  636. 
  637. File: texinfo.info,  Node: Cropmarks and Magnification,  Prev: A4 Paper,  Up: Format/Print Hardcopy
  638.  
  639. Cropmarks and Magnification
  640. ===========================
  641.  
  642.   You can attempt to direct TeX to print cropmarks at the corners of
  643. pages with the `@cropmarks' command.  Write the `@cropmarks' command on
  644. a line by itself between `@iftex' and `@end iftex' lines near the
  645. beginning of the Texinfo file, before the title page, like this:
  646.  
  647.      @iftex
  648.      @cropmarks
  649.      @end iftex
  650.  
  651.   This command is mainly for printers that typeset several pages on one
  652. sheet of film; but you can attempt to use it to mark the corners of a
  653. book set to 7 by 9.25 inches with the `@smallbook' command.  (Printers
  654. will not produce cropmarks for regular sized output that is printed on
  655. regular sized paper.)  Since different printing machines work in
  656. different ways, you should explore the use of this command with a
  657. spirit of adventure.  You may have to redefine the command in the
  658. `texinfo.tex' definitions file.
  659.  
  660.   You can attempt to direct TeX to typeset pages larger or smaller than
  661. usual with the `\mag' TeX command.  Everything that is typeset is
  662. scaled proportionally larger or smaller.  (`\mag' stands for
  663. "magnification".)  This is *not* a Texinfo @-command, but is a plain
  664. TeX command that is prefixed with a backslash.  You have to write this
  665. command between `@tex' and `@end tex' (*note Raw Formatter Commands::.).
  666.  
  667.   Follow the `\mag' command with an `=' and then a number that is 1000
  668. times the magnification you desire.  For example, to print pages at 1.2
  669. normal size, write the following near the beginning of the Texinfo
  670. file, before the title page:
  671.  
  672.      @tex
  673.      \mag=1200
  674.      @end tex
  675.  
  676.   With some printing technologies, you can print normal-sized copies
  677. that look better than usual by using a larger-than-normal master.
  678.  
  679.   Depending on your system, `\mag' may not work or may work only at
  680. certain magnifications.  Be prepared to experiment.
  681.  
  682. 
  683. File: texinfo.info,  Node: Create an Info File,  Next: Install an Info File,  Prev: Format/Print Hardcopy,  Up: Top
  684.  
  685. Creating an Info File
  686. *********************
  687.  
  688.   `makeinfo' is a utility that converts a Texinfo file into an Info
  689. file; `texinfo-format-region' and `texinfo-format-buffer' are GNU Emacs
  690. functions that do the same.
  691.  
  692.   A Texinfo file must contain an `@setfilename' line near its
  693. beginning, otherwise the Info formatting commands will fail.
  694.  
  695.   For information on installing the Info file in the Info system, see
  696. *Note Install an Info File::.
  697.  
  698. * Menu:
  699.  
  700. * makeinfo advantages::         `makeinfo' provides better error checking.
  701. * Invoking makeinfo::           How to run `makeinfo' from a shell.
  702. * makeinfo options::            Specify fill-column and other options.
  703. * Pointer Validation::          How to check that pointers point somewhere.
  704. * makeinfo in Emacs::           How to run `makeinfo' from Emacs.
  705. * texinfo-format commands::     Two Info formatting commands written
  706.                                   in Emacs Lisp are an alternative
  707.                                   to `makeinfo'.
  708. * Batch Formatting::            How to format for Info in Emacs Batch mode.
  709. * Tag and Split Files::         How tagged and split files help Info
  710.                                   to run better.
  711.  
  712. 
  713. File: texinfo.info,  Node: makeinfo advantages,  Next: Invoking makeinfo,  Prev: Create an Info File,  Up: Create an Info File
  714.  
  715. `makeinfo' Preferred
  716. ====================
  717.  
  718.   The `makeinfo' utility creates an Info file from a Texinfo source
  719. file more quickly than either of the Emacs formatting commands and
  720. provides better error messages.  We recommend it.  `makeinfo' is a C
  721. program that is independent of Emacs.  You do not need to run Emacs to
  722. use `makeinfo', which means you can use `makeinfo' on machines that are
  723. too small to run Emacs. You can run `makeinfo' in any one of three
  724. ways: from an operating system shell, from a shell inside Emacs, or by
  725. typing a key command in Texinfo mode in Emacs.
  726.  
  727.   The `texinfo-format-region' and the `texinfo-format-buffer' commands
  728. are useful if you cannot run `makeinfo'.  Also, in some circumstances,
  729. they format short regions or buffers more quickly than `makeinfo'.
  730.  
  731. 
  732. File: texinfo.info,  Node: Invoking makeinfo,  Next: makeinfo options,  Prev: makeinfo advantages,  Up: Create an Info File
  733.  
  734. Running `makeinfo' from a Shell
  735. ===============================
  736.  
  737.   To create an Info file from a Texinfo file, type `makeinfo' followed
  738. by the name of the Texinfo file.  Thus, to create the Info file for
  739. Bison, type the following to the shell: is the prompt):
  740.  
  741.      makeinfo bison.texinfo
  742.  
  743.   (You can run a shell inside Emacs by typing `M-x shell'.)
  744.  
  745.   Sometimes you will want to specify options.  For example, if you wish
  746. to discover which version of `makeinfo' you are using, type:
  747.  
  748.      makeinfo --version
  749.  
  750.   *Note makeinfo options::, for more information.
  751.  
  752. 
  753. File: texinfo.info,  Node: makeinfo options,  Next: Pointer Validation,  Prev: Invoking makeinfo,  Up: Create an Info File
  754.  
  755. Options for `makeinfo'
  756. ======================
  757.  
  758.   The `makeinfo' command takes a number of options.  Most often,
  759. options are used to set the value of the fill column and specify the
  760. footnote style.  Each command line option is a word preceded by `--' or
  761. a letter preceded by `-'.  You can use abbreviations for the long
  762. option names as long as they are unique.
  763.  
  764.   For example, you could use the following shell command to create an
  765. Info file for `bison.texinfo' in which each line is filled to only 68
  766. columns:
  767.  
  768.      makeinfo --fill-column=68 bison.texinfo
  769.  
  770.   You can write two or more options in sequence, like this:
  771.  
  772.      makeinfo --no-split --fill-column=70 ...
  773.  
  774. This would keep the Info file together as one possibly very long file
  775. and would also set the fill column to 70.
  776.  
  777.   The options are:
  778.  
  779. `-D VAR'
  780.      Cause the variable VAR to be defined.  This is equivalent to `@set
  781.      VAR' in the Texinfo file (*note set clear value::.).
  782.  
  783. `--error-limit=LIMIT'
  784.      Set the maximum number of errors that `makeinfo' will report
  785.      before exiting (on the assumption that continuing would be
  786.      useless); default 100.
  787.  
  788. `--fill-column=WIDTH'
  789.      Specify the maximum number of columns in a line; this is the
  790.      right-hand edge of a line.  Paragraphs that are filled will be
  791.      filled to this width.  (Filling is the process of breaking up and
  792.      connecting lines so that lines are the same length as or shorter
  793.      than the number specified as the fill column.  Lines are broken
  794.      between words.) The default value is 72.
  795.  
  796. `--footnote-style=STYLE'
  797.      Set the footnote style to STYLE, either `end' for the end node
  798.      style (the default) or `separate' for the separate node style.
  799.      The value set by this option overrides the value set in a Texinfo
  800.      file by an `@footnotestyle' command (*note Footnotes::.).  When the
  801.      footnote style is `separate', `makeinfo' makes a new node
  802.      containing the footnotes found in the current node.  When the
  803.      footnote style is `end', `makeinfo' places the footnote references
  804.      at the end of the current node.
  805.  
  806. `--force'
  807.      Ordinarily, if the input file has errors, the output files are not
  808.      created.  With this option, they are preserved.
  809.  
  810. `--help'
  811.      Print a usage message listing all available options, then exit
  812.      successfully.
  813.  
  814. `-I DIR'
  815.      Add `dir' to the directory search list for finding files that are
  816.      included using the `@include' command.  By default, `makeinfo'
  817.      searches only the current directory.
  818.  
  819. `--no-headers'
  820.      Do not include menus or node lines in the output.  This results in
  821.      an ASCII file that you cannot read in Info since it does not
  822.      contain the requisite nodes or menus. It is primarily useful to
  823.      extract certain pieces of a manual into separate files to be
  824.      included in a distribution, such as `INSTALL' files.
  825.  
  826. `--no-split'
  827.      Suppress the splitting stage of `makeinfo'.  By default, large
  828.      output files (where the size is greater than 70k bytes) are split
  829.      into smaller subfiles, each one approximately 50k bytes.
  830.  
  831. `--no-pointer-validate'
  832. `--no-validate'
  833.      Suppress the pointer-validation phase of `makeinfo'.  Normally,
  834.      after a Texinfo file is processed, some consistency checks are
  835.      made to ensure that cross references can be resolved, etc.  *Note
  836.      Pointer Validation::.
  837.  
  838. `--no-warn'
  839.      Suppress warning messages (but *not* error messages).  You might
  840.      want this if the file you are creating has examples of Texinfo
  841.      cross references within it, and the nodes that are referenced do
  842.      not actually exist.
  843.  
  844. `--no-number-footnotes'
  845.      Suppress automatic footnote numbering.  By default, `makeinfo'
  846.      numbers each footnote sequentially in a single node, resetting the
  847.      current footnote number to 1 at the start of each node.
  848.  
  849. `--output=FILE'
  850. `-o FILE'
  851.      Specify that the output should be directed to FILE and not to the
  852.      file name specified in the `@setfilename' command found in the
  853.      Texinfo source (*note setfilename::.).  If FILE is `-', output
  854.      goes to standard output and `--no-split' is implied.
  855.  
  856. `-P DIR'
  857.      Prepend `dir' to the directory search list for `@include'.  See
  858.      `-I' for more details.
  859.  
  860. `--paragraph-indent=INDENT'
  861.      Set the paragraph indentation style to INDENT.  The value set by
  862.      this option overrides the value set in a Texinfo file by an
  863.      `@paragraphindent' command (*note paragraphindent::.).  The value
  864.      of INDENT is interpreted as follows:
  865.  
  866.     `asis'
  867.           Preserve any existing indentation at the starts of paragraphs.
  868.  
  869.     `0' or `none'
  870.           Delete any existing indentation.
  871.  
  872.     NUM
  873.           Indent each paragraph by that number of spaces.
  874.  
  875. `--reference-limit=LIMIT'
  876.      Set the value of the number of references to a node that
  877.      `makeinfo' will make without reporting a warning.  If a node has
  878.      more than this number of references in it, `makeinfo' will make the
  879.      references but also report a warning.  The default is 1000.
  880.  
  881. `-U VAR'
  882.      Cause VAR to be undefined.  This is equivalent to `@clear VAR' in
  883.      the Texinfo file (*note set clear value::.).
  884.  
  885. `--verbose'
  886.      Cause `makeinfo' to display messages saying what it is doing.
  887.      Normally, `makeinfo' only outputs messages if there are errors or
  888.      warnings.
  889.  
  890. `--version'
  891.      Print the version number, then exit successfully.
  892.  
  893. 
  894. File: texinfo.info,  Node: Pointer Validation,  Next: makeinfo in Emacs,  Prev: makeinfo options,  Up: Create an Info File
  895.  
  896. Pointer Validation
  897. ==================
  898.  
  899.   If you do not suppress pointer-validation, `makeinfo' will check the
  900. validity of the final Info file.  Mostly, this means ensuring that
  901. nodes you have referenced really exist.  Here is a complete list of what
  902. is checked:
  903.  
  904.   1. If a `Next', `Previous', or `Up' node reference is a reference to a
  905.      node in the current file and is not an external reference such as
  906.      to `(dir)', then the referenced node must exist.
  907.  
  908.   2. In every node, if the `Previous' node is different from the `Up'
  909.      node, then the `Previous' node must also be pointed to by a `Next'
  910.      node.
  911.  
  912.   3. Every node except the `Top' node must have an `Up' pointer.
  913.  
  914.   4. The node referenced by an `Up' pointer must contain a reference to
  915.      the current node in some manner other than through a `Next'
  916.      reference.  This includes menu entries and cross references.
  917.  
  918.   5. If the `Next' reference of a node is not the same as the `Next'
  919.      reference of the `Up' reference, then the node referenced by the
  920.      `Next' pointer must have a `Previous' pointer that points back to
  921.      the current node.  This rule allows the last node in a section to
  922.      point to the first node of the next chapter.
  923.  
  924. 
  925. File: texinfo.info,  Node: makeinfo in Emacs,  Next: texinfo-format commands,  Prev: Pointer Validation,  Up: Create an Info File
  926.  
  927. Running `makeinfo' inside Emacs
  928. ===============================
  929.  
  930.   You can run `makeinfo' in GNU Emacs Texinfo mode by using either the
  931. `makeinfo-region' or the `makeinfo-buffer' commands.  In Texinfo mode,
  932. the commands are bound to `C-c C-m C-r' and `C-c C-m C-b' by default.
  933.  
  934. `C-c C-m C-r'
  935. `M-x makeinfo-region'
  936.      Format the current region for Info.
  937.  
  938. `C-c C-m C-b'
  939. `M-x makeinfo-buffer'
  940.      Format the current buffer for Info.
  941.  
  942.   When you invoke either `makeinfo-region' or `makeinfo-buffer', Emacs
  943. prompts for a file name, offering the name of the visited file as the
  944. default.  You can edit the default file name in the minibuffer if you
  945. wish, before pressing <RET> to start the `makeinfo' process.
  946.  
  947.   The Emacs `makeinfo-region' and `makeinfo-buffer' commands run the
  948. `makeinfo' program in a temporary shell buffer.  If `makeinfo' finds
  949. any errors, Emacs displays the error messages in the temporary buffer.
  950.  
  951.   You can parse the error messages by typing `C-x `' (`next-error').
  952. This causes Emacs to go to and position the cursor on the line in the
  953. Texinfo source that `makeinfo' thinks caused the error.  *Note Running
  954. `make' or Compilers Generally: (emacs)Compilation, for more information
  955. about using the `next-error' command.
  956.  
  957.   In addition, you can kill the shell in which the `makeinfo' command
  958. is running or make the shell buffer display its most recent output.
  959.  
  960. `C-c C-m C-k'
  961. `M-x makeinfo-kill-job'
  962.      Kill the current running `makeinfo' job created by
  963.      `makeinfo-region' or `makeinfo-buffer'.
  964.  
  965. `C-c C-m C-l'
  966. `M-x makeinfo-recenter-output-buffer'
  967.      Redisplay the `makeinfo' shell buffer to display its most recent
  968.      output.
  969.  
  970. (Note that the parallel commands for killing and recentering a TeX job
  971. are `C-c C-t C-k' and `C-c C-t C-l'.  *Note Texinfo Mode Printing::.)
  972.  
  973.   You can specify options for `makeinfo' by setting the
  974. `makeinfo-options' variable with either the `M-x edit-options' or the
  975. `M-x set-variable' command, or by setting the variable in your `.emacs'
  976. initialization file.
  977.  
  978.   For example, you could write the following in your `.emacs' file:
  979.  
  980.      (setq makeinfo-options
  981.            "--paragraph-indent=0 --no-split
  982.             --fill-column=70 --verbose")
  983.  
  984. For more information, see
  985. *Note Editing Variable Values: (emacs)Edit Options,
  986. *Note Examining and Setting Variables: (emacs)Examining,
  987. *Note Init File: (emacs)Init File, and
  988. *Note Options for `makeinfo': makeinfo options.
  989.  
  990. 
  991. File: texinfo.info,  Node: texinfo-format commands,  Next: Batch Formatting,  Prev: makeinfo in Emacs,  Up: Create an Info File
  992.  
  993. The `texinfo-format...' Commands
  994. ================================
  995.  
  996. In GNU Emacs in Texinfo mode, you can format part or all of a Texinfo
  997. file with the `texinfo-format-region' command.  This formats the
  998. current region and displays the formatted text in a temporary buffer
  999. called `*Info Region*'.
  1000.  
  1001.   Similarly, you can format a buffer with the `texinfo-format-buffer'
  1002. command.  This command creates a new buffer and generates the Info file
  1003. in it.  Typing `C-x C-s' will save the Info file under the name
  1004. specified by the `@setfilename' line which must be near the beginning
  1005. of the Texinfo file.
  1006.  
  1007. `C-c C-e C-r'
  1008. ``texinfo-format-region''
  1009.      Format the current region for Info.
  1010.  
  1011. `C-c C-e C-b'
  1012. ``texinfo-format-buffer''
  1013.      Format the current buffer for Info.
  1014.  
  1015.   The `texinfo-format-region' and `texinfo-format-buffer' commands
  1016. provide you with some error checking, and other functions can provide
  1017. you with further help in finding formatting errors.  These procedures
  1018. are described in an appendix; see *Note Catching Mistakes::.  However,
  1019. the `makeinfo' program is often faster and provides better error
  1020. checking (*note makeinfo in Emacs::.).
  1021.  
  1022. 
  1023. File: texinfo.info,  Node: Batch Formatting,  Next: Tag and Split Files,  Prev: texinfo-format commands,  Up: Create an Info File
  1024.  
  1025. Batch Formatting
  1026. ================
  1027.  
  1028.   You can format Texinfo files for Info using `batch-texinfo-format'
  1029. and Emacs Batch mode.  You can run Emacs in Batch mode from any shell,
  1030. including a shell inside of Emacs.  (*Note Command Line Switches and
  1031. Arguments: (emacs)Command Switches.)
  1032.  
  1033.   Here is a shell command to format all the files that end in
  1034. `.texinfo' in the current directory:
  1035.  
  1036.      emacs -batch -funcall batch-texinfo-format *.texinfo
  1037.  
  1038. Emacs processes all the files listed on the command line, even if an
  1039. error occurs while attempting to format some of them.
  1040.  
  1041.   Run `batch-texinfo-format' only with Emacs in Batch mode as shown; it
  1042. is not interactive.  It kills the Batch mode Emacs on completion.
  1043.  
  1044.   `batch-texinfo-format' is convenient if you lack `makeinfo' and want
  1045. to format several Texinfo files at once.  When you use Batch mode, you
  1046. create a new Emacs process.  This frees your current Emacs, so you can
  1047. continue working in it.  (When you run `texinfo-format-region' or
  1048. `texinfo-format-buffer', you cannot use that Emacs for anything else
  1049. until the command finishes.)
  1050.  
  1051. 
  1052. File: texinfo.info,  Node: Tag and Split Files,  Prev: Batch Formatting,  Up: Create an Info File
  1053.  
  1054. Tag Files and Split Files
  1055. =========================
  1056.  
  1057.   If a Texinfo file has more than 30,000 bytes, `texinfo-format-buffer'
  1058. automatically creates a tag table for its Info file;  `makeinfo' always
  1059. creates a tag table.  With a "tag table", Info can jump to new nodes
  1060. more quickly than it can otherwise.
  1061.  
  1062.   In addition, if the Texinfo file contains more than about 70,000
  1063. bytes, `texinfo-format-buffer' and `makeinfo' split the large Info file
  1064. into shorter "indirect" subfiles of about 50,000 bytes each.  Big files
  1065. are split into smaller files so that Emacs does not need to make a
  1066. large buffer to hold the whole of a large Info file; instead, Emacs
  1067. allocates just enough memory for the small, split off file that is
  1068. needed at the time.  This way, Emacs avoids wasting memory when you run
  1069. Info.  (Before splitting was implemented, Info files were always kept
  1070. short and "include files" were designed as a way to create a single,
  1071. large printed manual out of the smaller Info files.  *Note Include
  1072. Files::, for more information.  Include files are still used for very
  1073. large documents, such as `The Emacs Lisp Reference Manual', in which
  1074. each chapter is a separate file.)
  1075.  
  1076.   When a file is split, Info itself makes use of a shortened version of
  1077. the original file that contains just the tag table and references to
  1078. the files that were split off.  The split off files are called
  1079. "indirect" files.
  1080.  
  1081.   The split off files have names that are created by appending `-1',
  1082. `-2', `-3' and so on to the file name specified by the `@setfilename'
  1083. command.  The shortened version of the original file continues to have
  1084. the name specified by `@setfilename'.
  1085.  
  1086.   At one stage in writing this document, for example, the Info file was
  1087. saved as `test-texinfo' and that file looked like this:
  1088.  
  1089.      Info file: test-texinfo,    -*-Text-*-
  1090.      produced by texinfo-format-buffer
  1091.      from file: new-texinfo-manual.texinfo
  1092.      
  1093.      ^_
  1094.      Indirect:
  1095.      test-texinfo-1: 102
  1096.      test-texinfo-2: 50422
  1097.      test-texinfo-3: 101300
  1098.      ^_^L
  1099.      Tag table:
  1100.      (Indirect)
  1101.      Node: overview^?104
  1102.      Node: info file^?1271
  1103.      Node: printed manual^?4853
  1104.      Node: conventions^?6855
  1105.      ...
  1106.  
  1107. (But `test-texinfo' had far more nodes than are shown here.)  Each of
  1108. the split off, indirect files, `test-texinfo-1', `test-texinfo-2', and
  1109. `test-texinfo-3', is listed in this file after the line that says
  1110. `Indirect:'.  The tag table is listed after the line that says `Tag
  1111. table:'.
  1112.  
  1113.   In the list of indirect files, the number following the file name
  1114. records the cumulative number of bytes in the preceding indirect files,
  1115. not counting the file list itself, the tag table, or the permissions
  1116. text in each file.  In the tag table, the number following the node name
  1117. records the location of the beginning of the node, in bytes from the
  1118. beginning.
  1119.  
  1120.   If you are using `texinfo-format-buffer' to create Info files, you
  1121. may want to run the `Info-validate' command.  (The `makeinfo' command
  1122. does such a good job on its own, you do not need `Info-validate'.)
  1123. However, you cannot run the `M-x Info-validate' node-checking command
  1124. on indirect files.  For information on how to prevent files from being
  1125. split and how to validate the structure of the nodes, see *Note Using
  1126. Info-validate::.
  1127.  
  1128. 
  1129. File: texinfo.info,  Node: Install an Info File,  Next: Command List,  Prev: Create an Info File,  Up: Top
  1130.  
  1131. Installing an Info File
  1132. ***********************
  1133.  
  1134.   Info files are usually kept in the `info' directory.  You can read
  1135. Info files using the standalone Info program or the Info reader built
  1136. into Emacs.  (*note info: (info)Top, for an introduction to Info.)
  1137.  
  1138. * Menu:
  1139.  
  1140. * Directory file::              The top level menu for all Info files.
  1141. * New Info File::               Listing a new info file.
  1142. * Other Info Directories::      How to specify Info files that are
  1143.                                   located in other directories.
  1144. * Installing Dir Entries::      How to specify what menu entry to add
  1145.                                   to the Info directory.
  1146. * Invoking install-info::       `install-info' options.
  1147.  
  1148. 
  1149. File: texinfo.info,  Node: Directory file,  Next: New Info File,  Prev: Install an Info File,  Up: Install an Info File
  1150.  
  1151. The `dir' File
  1152. ==============
  1153.  
  1154.   For Info to work, the `info' directory must contain a file that
  1155. serves as a top level directory for the Info system.  By convention,
  1156. this file is called `dir'.  (You can find the location of this file
  1157. within Emacs by typing `C-h i' to enter Info and then typing `C-x C-f'
  1158. to see the pathname to the `info' directory.)
  1159.  
  1160.   The `dir' file is itself an Info file.  It contains the top level
  1161. menu for all the Info files in the system.  The menu looks like this:
  1162.  
  1163.      * Menu:
  1164.      
  1165.      * Info:    (info).     Documentation browsing system.
  1166.      * Emacs:   (emacs).    The extensible, self-documenting
  1167.                             text editor.
  1168.      * Texinfo: (texinfo).  With one source file, make
  1169.                             either a printed manual using
  1170.                             TeX or an Info file.
  1171.      ...
  1172.  
  1173.   Each of these menu entries points to the `Top' node of the Info file
  1174. that is named in parentheses.  (The menu entry does not need to specify
  1175. the `Top' node, since Info goes to the `Top' node if no node name is
  1176. mentioned.  *Note Nodes in Other Info Files: Other Info Files.)
  1177.  
  1178.   Thus, the `Info' entry points to the `Top' node of the `info' file
  1179. and the `Emacs' entry points to the `Top' node of the `emacs' file.
  1180.  
  1181.   In each of the Info files, the `Up' pointer of the `Top' node refers
  1182. back to the `dir' file.  For example, the line for the `Top' node of
  1183. the Emacs manual looks like this in Info:
  1184.  
  1185.      File: emacs  Node: Top, Up: (DIR), Next: Distrib
  1186.  
  1187. (Note that in this case, the `dir' file name is written in upper case
  1188. letters--it can be written in either upper or lower case.  Info has a
  1189. feature that it will change the case of the file name to lower case if
  1190. it cannot find the name as written.)
  1191.  
  1192. 
  1193. File: texinfo.info,  Node: New Info File,  Next: Other Info Directories,  Prev: Directory file,  Up: Install an Info File
  1194.  
  1195. Listing a New Info File
  1196. =======================
  1197.  
  1198.   To add a new Info file to your system, you must write a menu entry to
  1199. add to the menu in the `dir' file in the `info' directory.  For
  1200. example, if you were adding documentation for GDB, you would write the
  1201. following new entry:
  1202.  
  1203.      * GDB: (gdb).           The source-level C debugger.
  1204.  
  1205. The first part of the menu entry is the menu entry name, followed by a
  1206. colon.  The second part is the name of the Info file, in parentheses,
  1207. followed by a period.  The third part is the description.
  1208.  
  1209.   The name of an Info file often has a `.info' extension.  Thus, the
  1210. Info file for GDB might be called either `gdb' or `gdb.info'.  The Info
  1211. reader programs automatically try the file name both with and without
  1212. `.info'; so it is better to avoid clutter and not to write `.info'
  1213. explicitly in the menu entry.  For example, the GDB menu entry should
  1214. use just `gdb' for the file name, not `gdb.info'.
  1215.  
  1216.